export const exchangeIndex = (a)=>{    
    let arr=String(a).split('')
    let numObj=[{
        id:1,
        name:'一'
    },{
        id:2,
        name:'二'
    },{
        id:3,
        name:'三'
    },{
        id:4,
        name:'四'
    },{
        id:5,
        name:'五'
    },{
        id:6,
        name:'六'
    },{
        id:7,
        name:'七'
    },{
        id:8,
        name:'八'
    },{
        id:9,
        name:'九'
    },{
        id:10,
        name:'十'
    }]
    if(arr.length==1||a==10){
        if(a==10){
            return '十'
        }
        return numObj.filter(item=>item.id==arr[0])[0].name
    }else{
        if(a<=19){
            let single=numObj.filter(item=>item.id==(parseInt(arr[1])))[0].name
            return "十"+single
        }else if(a>19&&arr[1]==0){
            if(a==100){
                return '一百'
            }
            return numObj.filter(item=>item.id==parseInt(arr[0]))[0].name+'十'
        }
        let single=numObj.filter(item=>item.id==(parseInt(arr[1])))[0].name
        let ten=numObj.filter(item=>item.id==arr[0])[0].name
        return ten+'十'+single
    }   
}